#ifndef __PARSER_H__
#define __PARSER_H__

#include <string>
#include <vector>
#include "split.h"
#include "transaction.h"
#include "situation.h"

namespace stock_trade{

class Parser{
public:
    static void Init(const std::string& baseDir);
    static std::vector<Transaction> ParseTransaction(const Stock& stock, const Date& date);
    static std::vector<Situation> ParseSituation(const Stock& stock, const Date& date);
    static std::vector<Situation> ParserLongTimeSituation(const Stock& stock, Date beginDate, const unsigned int beforeDay);
    static std::vector<Transaction> ParserLongTimeTransaction(const Stock& stock, Date beginDate, const unsigned int beforeDay);
    static std::vector<Stock> readAllStock(const std::string& fileName);
private:
    static std::string baseDir;
};

}

#endif
